fix(util): Windows SmartProxyFunc real-machine fixes (ieproxy PAC short-circuit, fAutoDetect) + windows-proxy CI repairs - #759
Merged
Merged
Conversation
Out-File does not create parent directories, so the probe build died with 'Could not find a part of the path ...probe/main.go' before any layer ran. Layer 3 also pointed AutoConfigURL at 127.0.0.1:8099 with nothing listening; fetchPACScript then degrades to DIRECT by design and the assertion cannot pass. Serve probe/www with python -m http.server and wait for readiness before probing. Co-Authored-By: ggcode <noreply@ggcode.dev>
probe/main.go imported time without using it; probe/fetch/main.go used time.Second without importing time -- the go build failed on the runner before any layer test ran. Co-Authored-By: ggcode <noreply@ggcode.dev>
… Windows
ieproxy.GetProxyFunc() runs its own WinHTTP PAC resolution when
AutoConfig is active and returns scheme-less URLs (&url.URL{Host: ...}),
so SmartProxyFunc's forwarder/pac engine was unreachable on real Windows
and SOCKS PAC directives were misused as HTTP proxies. Build the static
layer from httpproxy.Config ourselves (mirroring ieproxy's staticProxy)
and leave AutoConfig entirely to layer 3.
Found on a real windows-latest runner: probe printed
'PROXY //127.0.0.1:8888' instead of 'http://127.0.0.1:8888'.
Co-Authored-By: ggcode <noreply@ggcode.dev>
… layer GitHub windows runners boot with fAutoDetect=true, which makes ieproxy's Automatic.Active true with no AutoConfigURL; gating the static layer on !Automatic.Active turned layer 2 into DIRECT on such machines. staticSystemProxy now consults only Static.Active -- WPAD-only autoDetect has no PreConfiguredURL and already degrades to DIRECT in the PAC layer. Co-Authored-By: ggcode <noreply@ggcode.dev>
The filter 'PAC|SmartProxy' does not match TestProxyURLFromDirective, so the directive table tests never ran in CI -- which is how the SOCKS slice off-by-one (fixed in 62984ee) slipped through after passing the committed tests locally. Co-Authored-By: ggcode <noreply@ggcode.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #761 (def41e0), verified on real windows-latest runners across 6 iterations. Final run: all layers green.
Product fixes
31b83433):ieproxy.GetProxyFunc()runs its own WinHTTP PAC when AutoConfig is active and returns scheme-less URLs (//host:port), making SmartProxyFunc's forwarder/pac layer dead code on real Windows and mis-handling SOCKS directives. The static layer now buildshttpproxy.Configitself (mirroring ieproxy's staticProxy); AutoConfig belongs entirely to layer 3.71a92013): the WPAD auto-detect flag (true by default on github runners and many enterprise machines, with no AutoConfigURL) must not suppress the static proxy layer.CI repairs (windows-proxy.yml never reached its real tests before)
2aac6b46: Out-File does not create parent dirs (probe build died with 'Could not find a part of the path'); Layer 3 pointed at 127.0.0.1:8099 with nothing listening -- now serves the PAC viapython -m http.server+ readiness poll.f41df987: swappedtimeimports between the two probe programs.71a92013..:-run "PAC|SmartProxy"missedTestProxyURLFromDirective; now matches Directive.The SOCKS slice off-by-one found during verification is already on main (62984ee) and intentionally excluded here.
Co-Authored-By: ggcode noreply@ggcode.dev